package a06oopextendsDemo;

public class Manager extends Employee {
    private double bonus;

    //定义构造方法
    //空参构造
    public Manager() {
    }

    //带参数的构造
    public Manager(String name, String id, double salary, double bonus) {
        super(name, id, salary);
        this.bonus = bonus;
    }

    //定义getter和setter方法,其他的变量不需要重写这些方法,因为父类里面已经有了
    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }

    @Override
    public void work(){
        System.out.println("经理"+getName()+"正在管理他人");
    }
}
